package com.intellagric.controller.portal.iftmonitor;

import com.intellagric.common.pojo.LayuiDataGridResult;
import com.intellagric.common.pojo.ResponseMessage;
import com.intellagric.pojo.IftCheckItem;
import com.intellagric.service.iftmonitor.ift_check_item.CheckItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Date;
import java.util.UUID;

/**
 * @Author: zhy
 * @email: 1269679946@qq.com
 * @Date: 2018/10/23
 * @DESC：
 */
@Controller
public class CheckItemController {

    @Autowired
    private CheckItemService checkItemService;

    /**
     * 查询检测项目信息
     * @return IftCheckItem
     */
    @RequestMapping("/checkitem/{id}")
    @ResponseBody
    public IftCheckItem get(@PathVariable String id) {
        return checkItemService.getCheckItemById(id);
    }

    /**
     * 查询检测项目信息列表
     * @return LayuiDataGridResult
     */
    @RequestMapping("/checkitem/list")
    @ResponseBody
    public LayuiDataGridResult getList() {
        return checkItemService.getCheckItemList();
    }

    /**
     * 分页查询检测项目信息列表
     * @return LayuiDataGridResult
     */
    @RequestMapping("/checkitem/page")
    @ResponseBody
    public LayuiDataGridResult getPage(int page,int limit) {
        return checkItemService.getCheckItemPage(page,limit);
    }

}
